package mx.com.asteca.persistencia.entidades;
// Generated 31/07/2013 11:41:38 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RolesModUsuarios generated by hbm2java
 */
@Entity
@Table(name="roles_mod_usuarios"
    ,catalog="astecadb"
)
public class RolesModUsuarios  implements java.io.Serializable {


     private int idRolModUsr;
     private Roles roles;
     private Personas personas;
     private Date periodoInicio;
     private Date periodoFin;
     private Short activo;
     private Set<RolesModPermisosUsr> rolesModPermisosUsrs = new HashSet<RolesModPermisosUsr>(0);

    public RolesModUsuarios() {
    }

	
    public RolesModUsuarios(int idRolModUsr) {
        this.idRolModUsr = idRolModUsr;
    }
    public RolesModUsuarios(int idRolModUsr, Roles roles, Personas personas, Date periodoInicio, Date periodoFin, Short activo, Set<RolesModPermisosUsr> rolesModPermisosUsrs) {
       this.idRolModUsr = idRolModUsr;
       this.roles = roles;
       this.personas = personas;
       this.periodoInicio = periodoInicio;
       this.periodoFin = periodoFin;
       this.activo = activo;
       this.rolesModPermisosUsrs = rolesModPermisosUsrs;
    }
   
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="ID_ROL_MOD_USR", unique=true, nullable=false)
    public int getIdRolModUsr() {
        return this.idRolModUsr;
    }
    
    public void setIdRolModUsr(int idRolModUsr) {
        this.idRolModUsr = idRolModUsr;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_ROL")
    public Roles getRoles() {
        return this.roles;
    }
    
    public void setRoles(Roles roles) {
        this.roles = roles;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_USUARIO")
    public Personas getPersonas() {
        return this.personas;
    }
    
    public void setPersonas(Personas personas) {
        this.personas = personas;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="PERIODO_INICIO", length=10)
    public Date getPeriodoInicio() {
        return this.periodoInicio;
    }
    
    public void setPeriodoInicio(Date periodoInicio) {
        this.periodoInicio = periodoInicio;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="PERIODO_FIN", length=10)
    public Date getPeriodoFin() {
        return this.periodoFin;
    }
    
    public void setPeriodoFin(Date periodoFin) {
        this.periodoFin = periodoFin;
    }
    
    @Column(name="ACTIVO")
    public Short getActivo() {
        return this.activo;
    }
    
    public void setActivo(Short activo) {
        this.activo = activo;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rolesModUsuarios")
    public Set<RolesModPermisosUsr> getRolesModPermisosUsrs() {
        return this.rolesModPermisosUsrs;
    }
    
    public void setRolesModPermisosUsrs(Set<RolesModPermisosUsr> rolesModPermisosUsrs) {
        this.rolesModPermisosUsrs = rolesModPermisosUsrs;
    }




}


